package EventSourcing;

import android.util.Log;


public class PipeDragEvent implements TrackableEvent{
	DragComponent source; 
	DragComponent target;
	int dragItem;
	
	public PipeDragEvent(DragComponent source , DragComponent target, int dragItem){
		this.source = source;
		this.target = target;
		this.dragItem=dragItem; 
	}

	public void executeEvent() {
		Log.d("PIPEGAME","execute event");
		source.performDragSourceEvent();
		target.performDragTargetEvent(dragItem);
		
	}

	public void revertEvent() {
		Log.d("PIPEGAME","revert event");
		source.performDragTargetEvent(dragItem);
		target.performDragSourceEvent();
		
	}
}
